package com.qrpay.model.enums;

public enum ProviderType {

    SD("SD", "SD", "SD"),
    ;

    private final String code;
    private final String descCh;
    private final String descEn;

    ProviderType(String code, String descCh, String descEn) {
        this.code = code;
        this.descCh = descCh;
        this.descEn = descEn;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return getDescCh();
    }

    public String getDescCh() {
        return descCh;
    }

    public String getDescEn() {
        return descEn;
    }

    public boolean equals(String code) {
        return this.code.equals(code);
    }

    public static ProviderType byCode(String code) {
        for (ProviderType t : values()) {
            if (t.equals(code)) return t;
        }
        return null;
    }
}
